<?php
$_GET['code'] = empty($_GET['code']) ? '' : trim($_GET['code']);

$custom = array(
	'ptitle'=> '邮箱绑定确认',
	'title'	=> '邮箱确认失败',
	'detail'=> <<<HTML
您绑定的邮箱：<b>{$__userinfo['email']}</b>
HTML
,
	'links'	=> array(
		'用户信息'	=> './index.php?frm=user&mdl=user&do=info',
		'用户中心'	=> './index.php?frm=user',
	),
);

try{
	$code = base64_decode($_GET['code']);
	$code = php_authcode($code, 'DECODE');
	$arr = unserialize($code);
	//$arr = unserialize(php_authcode(base64_decode($_GET['code']), 'DECODE'));
}catch(Exception $e){}
if(empty($arr) || empty($arr['email'])){
	$custom['title'] = '参数丢失或参数无效';
}elseif($arr['email'] == $__userinfo['email']){
	$r = $__oUser->update($__userinfo['userid'], array('email_verified' => 1));
	if($r > 0){
		$custom['title'] = '邮箱确认成功';
		$custom['synjs'] = $r['data']['synjs'];
	}
}

sysinfo($custom);
?>